package com.javalong.affairs.module.renwujinzhang.activity.send;

import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
import android.widget.AdapterView;
import android.widget.TextView;

import com.javalong.affairs.R;
import com.javalong.affairs.base.activity.ToolbarActivity;
import com.javalong.affairs.base.common.ViewHolder;
import com.javalong.affairs.base.constant.BundleKey;
import com.javalong.affairs.base.constant.DataType;
import com.javalong.affairs.base.constant.MapKey;
import com.javalong.affairs.base.data.AllData;
import com.javalong.affairs.base.fragment.BaseFragment;
import com.javalong.affairs.base.manager.IntentManager;
import com.javalong.affairs.base.model.SimpleMessage;
import com.javalong.affairs.base.model.TrackTask;
import com.javalong.affairs.base.ui.MyItemDecoration;
import com.javalong.affairs.base.ui.SimplePullRefreshList;
import com.javalong.affairs.module.notifything.activity.MsgDetailActivity;
import com.javalong.affairs.module.notifything.activity.NotificationActivity;
import com.javalong.affairs.module.notifything.adapter.NotificationAdapter;
import com.javalong.affairs.module.renwujinzhang.activity.AuditTaskActivity;
import com.javalong.affairs.module.renwujinzhang.activity.NewNodeActivity;
import com.javalong.affairs.module.renwujinzhang.activity.NewTaskActivity;
import com.javalong.affairs.module.renwujinzhang.activity.TrackTaskActivity;
import com.javalong.affairs.module.renwujinzhang.activity.WatchTaskActivity;
import com.javalong.affairs.module.renwujinzhang.adapter.TaskAdapter;
import com.javalong.affairs.module.renwujinzhang.fragment.TaskFragment;
import com.javalong.affairs.module.renwujinzhang.model.Task;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * Created by 杨观回 on 2016/1/17 0017.
 */
public class SentTaskListFragment extends TaskFragment {
    @Override
    protected int getDataId() {
        return R.string.data_tracktask_send;
    }

    @Override
    protected Map<String, Object> getMapData() {
        Map<String, Object> param = new HashMap<>();
        param.put(MapKey.ACTION_NAME, "Task");
        param.put(MapKey.METHOD_NAME, "outList_sendList_wait");
        param.put(MapKey.DATA_RESID, R.string.data_tracktask_send);
        param.put(MapKey.DATA_TYPE, DataType.LIST_TRACKTASK);
        return param;
    }

    @Override
    public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
        Task task = getTask(position - 2);
        if (task != null) {
            WatchSendTaskActivity.toThisActivity(getActivity(), task);
        }
    }


    @Override
    protected void afterInit() {
        ((ToolbarActivity) getActivity()).getSupportActionBar().setTitle("待发送列表");
    }
}
